package com.order.appfood.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.order.appfood.mapper.AppFoodMapper;
import com.order.appfood.domain.AppFood;
import com.order.appfood.service.IAppFoodService;
import com.ruoyi.common.utils.text.Convert;

/**
 * APP视频管理Service业务层处理
 * 
 * @author huhu
 * @date 2020-09-04
 */
@Service
public class AppFoodServiceImpl implements IAppFoodService 
{
    @Autowired
    private AppFoodMapper appFoodMapper;

    /**
     * 查询APP视频管理
     * 
     * @param foodId APP视频管理ID
     * @return APP视频管理
     */
    @Override
    public AppFood selectAppFoodById(Long foodId)
    {
        return appFoodMapper.selectAppFoodById(foodId);
    }

    /**
     * 查询APP视频管理列表
     * 
     * @param appFood APP视频管理
     * @return APP视频管理
     */
    @Override
    public List<AppFood> selectAppFoodList(AppFood appFood)
    {
        return appFoodMapper.selectAppFoodList(appFood);
    }

    /**
     * 新增APP视频管理
     * 
     * @param appFood APP视频管理
     * @return 结果
     */
    @Override
    public int insertAppFood(AppFood appFood)
    {
        return appFoodMapper.insertAppFood(appFood);
    }

    /**
     * 修改APP视频管理
     * 
     * @param appFood APP视频管理
     * @return 结果
     */
    @Override
    public int updateAppFood(AppFood appFood)
    {
        return appFoodMapper.updateAppFood(appFood);
    }

    /**
     * 删除APP视频管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAppFoodByIds(String ids)
    {
        return appFoodMapper.deleteAppFoodByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除APP视频管理信息
     * 
     * @param foodId APP视频管理ID
     * @return 结果
     */
    @Override
    public int deleteAppFoodById(Long foodId)
    {
        return appFoodMapper.deleteAppFoodById(foodId);
    }

//    @Override
//    public List<AppFood> selectAppFoodAll() {
//        retur
//    }
    @Override
    public List<AppFood> selectAppFoodAll(){
        return appFoodMapper.selectAppFoodAll();
    }
}
